home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / pango-1.0 / pango / pango-fontset.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-25  |  4.1 KB  |  128 lines

  1. /* Pango
  2.  * pango-fontset.h: Font set handling
  3.  *
  4.  * Copyright (C) 2001 Red Hat Software
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Library General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  14.  * Library General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Library General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. #ifndef __PANGO_FONTSET_H__
  23. #define __PANGO_FONTSET_H__
  24.  
  25. #include <pango/pango-coverage.h>
  26. #include <pango/pango-types.h>
  27.  
  28. #include <glib-object.h>
  29.  
  30. G_BEGIN_DECLS
  31.  
  32. /*
  33.  * PangoFontset
  34.  */
  35.  
  36. #define PANGO_TYPE_FONTSET              (pango_fontset_get_type ())
  37. #define PANGO_FONTSET(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET, PangoFontset))
  38. #define PANGO_IS_FONTSET(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET))
  39.  
  40. GType pango_fontset_get_type (void) G_GNUC_CONST;
  41.  
  42. typedef struct _PangoFontset        PangoFontset;
  43.  
  44. /**
  45.  * PangoFontsetForeachFunc
  46.  * @fontset: a #PangoFontset
  47.  * @font: a font from @fontset
  48.  * @data: callback data
  49.  * 
  50.  * A callback function used by pango_fontset_foreach() when enumerating
  51.  * the fonts in a fontset.
  52.  *
  53.  * Returns: if %TRUE, stop iteration and return immediately.
  54.  *
  55.  * Since: 1.4
  56.  **/
  57. typedef gboolean (*PangoFontsetForeachFunc) (PangoFontset  *fontset,
  58.                          PangoFont     *font,
  59.                          gpointer       data);
  60.  
  61. PangoFont *       pango_fontset_get_font    (PangoFontset           *fontset,
  62.                          guint                   wc);
  63. PangoFontMetrics *pango_fontset_get_metrics (PangoFontset           *fontset);
  64. void              pango_fontset_foreach     (PangoFontset           *fontset,
  65.                          PangoFontsetForeachFunc func,
  66.                          gpointer                data);
  67.  
  68. #ifdef PANGO_ENABLE_BACKEND
  69.  
  70. typedef struct _PangoFontsetClass   PangoFontsetClass;
  71.  
  72. #define PANGO_FONTSET_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONTSET, PangoFontsetClass))
  73. #define PANGO_IS_FONTSET_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONTSET))
  74. #define PANGO_FONTSET_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONTSET, PangoFontsetClass))
  75.  
  76. struct _PangoFontset
  77. {
  78.   GObject parent_instance;
  79. };
  80.  
  81. struct _PangoFontsetClass
  82. {
  83.   GObjectClass parent_class;
  84.  
  85.   /*< public >*/
  86.    
  87.   PangoFont *       (*get_font)     (PangoFontset     *fontset,
  88.                      guint             wc);
  89.  
  90.   PangoFontMetrics *(*get_metrics)  (PangoFontset     *fontset);
  91.   PangoLanguage *   (*get_language) (PangoFontset     *fontset);
  92.   void              (*foreach)      (PangoFontset           *fontset,
  93.                      PangoFontsetForeachFunc func,
  94.                      gpointer                data);
  95.  
  96.   /*< private >*/
  97.  
  98.   /* Padding for future expansion */
  99.   void (*_pango_reserved1) (void);
  100.   void (*_pango_reserved2) (void);
  101.   void (*_pango_reserved3) (void);
  102.   void (*_pango_reserved4) (void);
  103. };
  104.  
  105. /*
  106.  * PangoFontsetSimple
  107.  */
  108.  
  109. #define PANGO_TYPE_FONTSET_SIMPLE       (pango_fontset_simple_get_type ())
  110. #define PANGO_FONTSET_SIMPLE(object)    (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET_SIMPLE, PangoFontsetSimple))
  111. #define PANGO_IS_FONTSET_SIMPLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET_SIMPLE))
  112.  
  113. typedef struct _PangoFontsetSimple  PangoFontsetSimple;
  114. typedef struct _PangoFontsetSimpleClass  PangoFontsetSimpleClass;
  115.  
  116. GType pango_fontset_simple_get_type (void) G_GNUC_CONST;
  117.  
  118. PangoFontsetSimple * pango_fontset_simple_new    (PangoLanguage      *language);
  119. void                 pango_fontset_simple_append (PangoFontsetSimple *fontset,
  120.                           PangoFont          *font);
  121. int                  pango_fontset_simple_size   (PangoFontsetSimple *fontset);
  122.  
  123. #endif /* PANGO_ENABLE_BACKEND */
  124.  
  125. G_END_DECLS
  126.  
  127. #endif /* __PANGO_FONTSET_H__ */
  128.